#ifndef ORGANIZATIONDIALOG_H
#define ORGANIZATIONDIALOG_H

#include <QDialog>

namespace Ui {
class OrganizationDialog;
}

class OrganizationDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit OrganizationDialog(QWidget *parent = 0);
    ~OrganizationDialog();

    void accept();

    QString getOrganization() const;
    QString getTown() const;
    QString getStreet() const;
    QString getNo() const;

    inline void setOrganizationId(const int id){ _id = id; }
    inline int getOrganizationId() const { return _id; }

    void setOrganization(const int organization_id);
private slots:
    void hideError();
    
private:
    void showError(const QString& msg, const int secs=3);

    Ui::OrganizationDialog *ui;
    void loadData();
    int _id;
};

#endif // ORGANIZATIONDIALOG_H
